import request from '@/utils/request'

// 查询计量器具列表
export function listInstruments(query) {
  return request({
    url: '/system/instruments/list',
    method: 'get',
    params: query
  })
}

// 查询计量器具详细
export function getInstruments(id) {
  return request({
    url: '/system/instruments/' + id,
    method: 'get'
  })
}

// 新增计量器具
export function addInstruments(data) {
  return request({
    url: '/system/instruments',
    method: 'post',
    data: data
  })
}

// 修改计量器具
export function updateInstruments(data) {
  return request({
    url: '/system/instruments',
    method: 'put',
    data: data
  })
}

// 删除计量器具
export function delInstruments(id) {
  return request({
    url: '/system/instruments/' + id,
    method: 'delete'
  })
}
// 查询计量器具检修日期(首页展示)
export function queryRepairTime() {
  return request({
    url: '/system/instruments/repairTime',
    method: 'get'
  })
}
